import { json, update, shanchu, get, list, form } from './index'
import api from './api'
import { Ref } from 'vue'

export default {
  /**********************************测试接口***************************************/
  ceshi: () => get(api.ceshi),
  tianqi: () => get(api.tianqi),
  weektianqi: () => get(api.weektianqi),
  /**********************************前端错误信息日志***************************************/
  senderror: (data: any) => json(api.senderror, data,),
  /**********************************登录接口***************************************/
  anylogin: (data: any, loading: Ref<boolean> | null = null) => list(api.anylogin, data, loading),
  login: (data: any, loading: Ref<boolean> | null = null) => json(api.login, data, loading),
  code: (data: any, loading: Ref<boolean> | null = null) => json(api.code, data, loading),
  zhuce: (data: any, loading: Ref<boolean> | null = null) => json(api.zhuce, data, loading),
  zhucemany: (data: any, loading: Ref<boolean> | null = null) => form(api.zhucemany, data, loading),
  getuserlist: (data: any, loading: Ref<boolean> | null = null) => list(api.getuserlist, data, loading),

  changeinfo: (data: any, loading: Ref<boolean> | null = null) => json(api.changeinfo, data, loading),  // 修改头像和简介
  changepwd: (data: any, loading: Ref<boolean> | null = null) => json(api.changepwd, data, loading),   // 修改密码
  /**********************************验证码接口***************************************/
  getcode: () => get(api.getcode),
  /**********************************用户详细信息***************************************/
  getuserinfo: (data: any, loading: Ref<boolean> | null = null) => get(api.userinfo, data, null, loading), // 获取用户的详细数据
  putuserinfo: (data: any, loading: Ref<boolean> | null = null) => update(api.userinfo, data, null, loading), // 修改用户的详细数据
  deleteuserinfo: (data: any, loading: Ref<boolean> | null = null) => shanchu(api.userinfo, data, null, loading), // 删除用户的详细数据
  /**********************************用户教育信息***************************************/
  addstudyinfo: (data: any, loading: Ref<boolean> | null = null) => json(api.studyinfo, data, loading),    // 创建用户教育经历
  getstudyinfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.studyinfo, data, id, loading),    // 获取用户教育经历
  liststudyinfo: (data: any, loading: Ref<boolean> | null = null) => list(api.studyinfo, data, loading),    // 获取用户教育经历
  putstudyinfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.studyinfo, data, id, loading),    // 修改用户教育经历
  deletestudyinfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.studyinfo, data, id, loading),    // 删除用户教育经历
  /**********************************用户培训信息***************************************/
  addpeixuninfo: (data: any, loading: Ref<boolean> | null = null) => json(api.peixuninfo, data, loading),   // 创建用户培训经历
  getpeixuninfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.peixuninfo, data, id, loading),   // 获取用户培训经历
  listpeixuninfo: (data: any, loading: Ref<boolean> | null = null) => list(api.peixuninfo, data, loading),   // 获取用户培训经历
  putpeixuninfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.peixuninfo, data, id, loading),   // 修改用户培训经历
  deletepeixuninfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.peixuninfo, data, id, loading),   // 删除用户培训经历
  /**********************************用户工作信息***************************************/
  addworkinfo: (data: any, loading: Ref<boolean> | null = null) => json(api.workinfo, data, loading), // 创建用户工作经历
  getworkinfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.workinfo, data, id, loading), // 获取用户工作经历
  listworkinfo: (data: any, loading: Ref<boolean> | null = null) => list(api.workinfo, data, loading), // 获取用户工作经历
  putworkinfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.workinfo, data, id, loading), // 修改用户工作经历
  deleteworkinfo: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.workinfo, data, id, loading), // 删除用户工作经历
  /**********************************角色相关***************************************/
  rolemodellist: (data: any, loading: Ref<boolean> | null = null) => list(api.rolemodel, data, loading),   // 博客栏目群查
  rolemodelget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.rolemodel, data, id, loading),   // 博客栏目单查
  rolemodeladd: (data: any, loading: Ref<boolean> | null = null) => json(api.rolemodel, data, loading),   // 博客栏目增加
  rolemodelupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.rolemodel, data, id, loading),   // 博客栏目修改
  rolemodeldelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.rolemodel, data, id, loading),   // 博客栏目删除
  /**********************************上传接口***************************************/
  upload: (data: any, loading: Ref<boolean> | null = null) => form(api.upload, data, loading),
  /**********************************字典相关接口***************************************/
  zidianlist: (data: any, loading: Ref<boolean> | null = null) => list(api.zidian, data, loading),   // 博客栏目群查
  zidianget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.zidian, data, id, loading),   // 博客栏目单查
  zidianadd: (data: any, loading: Ref<boolean> | null = null) => json(api.zidian, data, loading),   // 博客栏目增加
  zidianupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.zidian, data, id, loading),   // 博客栏目修改
  zidiandelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.zidian, data, id, loading),   // 博客栏目删除

  zidianfilter: (data: any, loading: Ref<boolean> | null = null) => list(api.zidianfilter, data, loading),       // 根据ID过滤数据
  zidiantree: (data: any, loading: Ref<boolean> | null = null) => list(api.zidiantree, data, loading),       // 获取全部树状数据
  /**********************************菜单管理接口***************************************/
  menulist: (data: any, loading: Ref<boolean> | null = null) => list(api.menu, data, loading),   // 菜单管理群查
  menuget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.menu, data, id, loading),   // 菜单管理单查
  menuadd: (data: any, loading: Ref<boolean> | null = null) => json(api.menu, data, loading),   // 菜单管理增加
  menuupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.menu, data, id, loading),   // 菜单管理修改
  menudelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.menu, data, id, loading),   // 菜单管理删除


  menubyuser: (data: any, loading: Ref<boolean> | null = null) => list(api.menubyuser, data, loading),
  menutree: (data: any, loading: Ref<boolean> | null = null) => list(api.menutree, data, loading),
  menubyposition: (data: any, loading: Ref<boolean> | null = null) => list(api.menubyposition, data, loading),
  /**********************************部门管理接口***************************************/
  departlist: (data: any, loading: Ref<boolean> | null = null) => list(api.depart, data, loading),   // 部门群查
  departget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.depart, data, id, loading),   // 部门单查
  departadd: (data: any, loading: Ref<boolean> | null = null) => json(api.depart, data, loading),   // 部门增加
  departupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.depart, data, id, loading),   // 部门修改
  departdelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.depart, data, id, loading),   // 部门删除

  departtree: (data: any, loading: Ref<boolean> | null = null) => list(api.departtree, data, loading),   // 全部部门
  /**********************************职位管理接口***************************************/
  positionlist: (data: any, loading: Ref<boolean> | null = null) => list(api.position, data, loading),   // 职位群查
  positionget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.position, data, id, loading),   // 职位单查
  positionadd: (data: any, loading: Ref<boolean> | null = null) => json(api.position, data, loading),   // 职位增加
  positionupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.position, data, id, loading),   // 职位修改
  positiondelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.position, data, id, loading),   // 职位删除

  positionUserlist: (data: any, loading: Ref<boolean> | null = null) => list(api.positionUser, data, loading),   // 职位关联用户群查
  positionUserget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.positionUser, data, id, loading),   // 职位关联用户单查
  positionUseradd: (data: any, loading: Ref<boolean> | null = null) => json(api.positionUser, data, loading),   // 职位关联用户增加
  positionUserdelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.positionUser, data, id, loading),   // 职位关联用户删除

  // positionMenulist: (data: any, loading: Ref<boolean> | null = null) => list(api.positionMenu, data, loading),   // 职位关联菜单群查
  positionMenuadd: (data: any, loading: Ref<boolean> | null = null) => json(api.positionMenu, data, loading),   // 职位关联菜单创建
  /**********************************地区管理接口***************************************/
  arealist: (data: any, loading: Ref<boolean> | null = null) => list(api.area, data, loading),   // 地区群查
  areaget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.area, data, id, loading),   // 地区单查
  areaadd: (data: any, loading: Ref<boolean> | null = null) => json(api.area, data, loading),   // 地区增加
  areaupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.area, data, id, loading),   // 地区修改
  areadelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.area, data, id, loading),   // 地区删除
  areaTree: (data: any, loading: Ref<boolean> | null = null) => list(api.areaTree, data, loading),   // 地区树状数据
  /**********************************试卷管理接口***************************************/
  testpaperlist: (data: any, loading: Ref<boolean> | null = null) => list(api.testpaper, data, loading),   // 试卷群查
  testpaperget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.testpaper, data, id, loading),   // 试卷单查
  testpaperadd: (data: any, loading: Ref<boolean> | null = null) => json(api.testpaper, data, loading),   // 试卷增加
  testpaperupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.testpaper, data, id, loading),   // 试卷修改
  testpaperdelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.testquestion, data, id, loading),   // 试卷删除
  /**********************************试题管理接口***************************************/
  testquestionlist: (data: any, loading: Ref<boolean> | null = null) => list(api.testquestion, data, loading),   // 试题群查
  testquestionget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.testquestion, data, id, loading),   // 试卷单查
  testquestionadd: (data: any, loading: Ref<boolean> | null = null) => json(api.testquestion, data, loading),   // 试题增加
  testquestionupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.testquestion, data, id, loading),   // 试题修改
  testquestiondelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.testquestion, data, id, loading),   // 试题删除
  /**********************************类型管理接口***************************************/
  testtaglist: (data: any, loading: Ref<boolean> | null = null) => list(api.testtag, data, loading),   // 试题类型群查
  testtagget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.testtag, data, id, loading),   // 试题类型单查
  testtagadd: (data: any, loading: Ref<boolean> | null = null) => json(api.testtag, data, loading),   // 试题类型增加
  testtagupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.testtag, data, id, loading),   // 试题类型修改
  testtagdelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.testtag, data, id, loading),   // 试题类型删除
  /**********************************考试管理接口***************************************/
  testkaoshilist: (data: any, loading: Ref<boolean> | null = null) => list(api.testkaoshi, data, loading),   // 试题群查
  testkaoshiget: (data: any, id: any = null, loading: Ref<boolean> | null = null) => get(api.testkaoshi, data, id, loading),   // 试卷单查
  testkaoshiadd: (data: any, loading: Ref<boolean> | null = null) => json(api.testkaoshi, data, loading),   // 试题增加
  testkaoshiupdate: (data: any, id: any = null, loading: Ref<boolean> | null = null) => update(api.testkaoshi, data, id, loading),   // 试题修改
  testkaoshidelete: (data: any, id: any = null, loading: Ref<boolean> | null = null) => shanchu(api.testkaoshi, data, id, loading),   // 试题删除
}
